/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.pruebaes.entidades;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author luisfernando
 */
@Entity
@Table(name = "informes")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Informes.findAll", query = "SELECT i FROM Informes i"),
    @NamedQuery(name = "Informes.findById", query = "SELECT i FROM Informes i WHERE i.id = :id"),
    @NamedQuery(name = "Informes.findByPedido", query = "SELECT i FROM Informes i WHERE i.pedido = :pedido"),
    @NamedQuery(name = "Informes.findByProxima", query = "SELECT i FROM Informes i WHERE i.proxima = :proxima"),
    @NamedQuery(name = "Informes.findByPlanificacion", query = "SELECT i FROM Informes i WHERE i.planificacion = :planificacion"),
    @NamedQuery(name = "Informes.findByRealizacion", query = "SELECT i FROM Informes i WHERE i.realizacion = :realizacion"),
    @NamedQuery(name = "Informes.findByFininforme", query = "SELECT i FROM Informes i WHERE i.fininforme = :fininforme"),
    @NamedQuery(name = "Informes.findByEntrevistado", query = "SELECT i FROM Informes i WHERE i.entrevistado = :entrevistado"),
    @NamedQuery(name = "Informes.findByCargo", query = "SELECT i FROM Informes i WHERE i.cargo = :cargo"),
    @NamedQuery(name = "Informes.findByObservacion", query = "SELECT i FROM Informes i WHERE i.observacion = :observacion"),
    @NamedQuery(name = "Informes.findByUserid", query = "SELECT i FROM Informes i WHERE i.userid = :userid"),
    @NamedQuery(name = "Informes.findByAuditoria", query = "SELECT i FROM Informes i WHERE i.auditoria = :auditoria"),
    @NamedQuery(name = "Informes.findByInspector", query = "SELECT i FROM Informes i WHERE i.inspector = :inspector")})
public class Informes implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Column(name = "pedido")
    @Temporal(TemporalType.DATE)
    private Date pedido;
    @Column(name = "proxima")
    @Temporal(TemporalType.DATE)
    private Date proxima;
    @Column(name = "planificacion")
    @Temporal(TemporalType.DATE)
    private Date planificacion;
    @Column(name = "realizacion")
    @Temporal(TemporalType.TIMESTAMP)
    private Date realizacion;
    @Column(name = "fininforme")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fininforme;
    @Size(max = 2147483647)
    @Column(name = "entrevistado")
    private String entrevistado;
    @Size(max = 2147483647)
    @Column(name = "cargo")
    private String cargo;
    @Size(max = 2147483647)
    @Column(name = "observacion")
    private String observacion;
    @Size(max = 2147483647)
    @Column(name = "userid")
    private String userid;
    @Column(name = "auditoria")
    private Boolean auditoria;
    @Size(max = 2147483647)
    @Column(name = "inspector")
    private String inspector;
    @JoinColumn(name = "permiso", referencedColumnName = "id")
    @ManyToOne
    private Permisos permiso;

    public Informes() {
    }

    public Informes(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Date getPedido() {
        return pedido;
    }

    public void setPedido(Date pedido) {
        this.pedido = pedido;
    }

    public Date getProxima() {
        return proxima;
    }

    public void setProxima(Date proxima) {
        this.proxima = proxima;
    }

    public Date getPlanificacion() {
        return planificacion;
    }

    public void setPlanificacion(Date planificacion) {
        this.planificacion = planificacion;
    }

    public Date getRealizacion() {
        return realizacion;
    }

    public void setRealizacion(Date realizacion) {
        this.realizacion = realizacion;
    }

    public Date getFininforme() {
        return fininforme;
    }

    public void setFininforme(Date fininforme) {
        this.fininforme = fininforme;
    }

    public String getEntrevistado() {
        return entrevistado;
    }

    public void setEntrevistado(String entrevistado) {
        this.entrevistado = entrevistado;
    }

    public String getCargo() {
        return cargo;
    }

    public void setCargo(String cargo) {
        this.cargo = cargo;
    }

    public String getObservacion() {
        return observacion;
    }

    public void setObservacion(String observacion) {
        this.observacion = observacion;
    }

    public String getUserid() {
        return userid;
    }

    public void setUserid(String userid) {
        this.userid = userid;
    }

    public Boolean getAuditoria() {
        return auditoria;
    }

    public void setAuditoria(Boolean auditoria) {
        this.auditoria = auditoria;
    }

    public String getInspector() {
        return inspector;
    }

    public void setInspector(String inspector) {
        this.inspector = inspector;
    }

    public Permisos getPermiso() {
        return permiso;
    }

    public void setPermiso(Permisos permiso) {
        this.permiso = permiso;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Informes)) {
            return false;
        }
        Informes other = (Informes) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.pruebaes.entidades.Informes[ id=" + id + " ]";
    }
    
}
